<script setup lang="ts">
import { ref } from 'vue';
import { useHome } from '../../../../composables/use-home';
import AttributeSimulation from './attribute-simulation.vue';
import EnemyAttributeSimulation from './enemy-attribute-simulation.vue';

const { changeScene } = useHome();

const activeKey = ref('attribute-simulation');

function onBackClick() {
  changeScene('main');
}
</script>

<template>
  <div class="illusion w-full h-full flex flex-col">
    <div class="flex-none py-2 text-lg font-bold text-center relative">
      <div class="absolute left-2 top-1/2 transform -translate-y-1/2">
        <a-button @click="onBackClick">返回</a-button>
      </div>
      <div>洞府 - 幻境</div>
    </div>
    <div
      class="flex-1 overflow-auto border-0 border-t border-solid border-border"
    >
      <a-tabs v-model:activeKey="activeKey" :centered="true">
        <a-tab-pane key="attribute-simulation" tab="玩家属性">
          <attribute-simulation></attribute-simulation>
        </a-tab-pane>
        <a-tab-pane key="enemy-attribute-simulation" tab="敌人属性">
          <enemy-attribute-simulation></enemy-attribute-simulation>
        </a-tab-pane>
      </a-tabs>
    </div>
  </div>
</template>

<style scoped>
.illusion :deep(.ant-tabs),
.illusion :deep(.ant-tabs-content) {
  height: 100%;
}
.illusion :deep(.ant-tabs-nav) {
  margin-bottom: 0;
}
.illusion :deep(.ant-card-body) {
  padding: 16px;
}
</style>
